﻿using System.ComponentModel.DataAnnotations.Schema;

namespace KingerRobot.MexicoSailunWMS.Spi;
public interface IVulcanizationService
{
    /// <summary>
    /// 硫化请料-订单查询
    /// </summary>
    /// <param name="orderNum">单号</param>
    /// <returns></returns>
    List<OutOrderMasterSummarys> GetOutOrderStatus(RequestOrderParm parm);
    /// <summary>
    /// 获取当前硫化机胎胚所在位置
    /// </summary>
    /// <param name="parm"></param>
    /// <returns></returns>
    List<CurRequestPositionBean> GetCurRequestPosition(RequestPositionParm parm);
    /// <summary>
    /// 硫化跟踪记录
    /// </summary>
    /// <param name="parm"></param>
    /// <returns></returns>
    List<RequestOrderCuringBean> GetOrderCuringStep(RequestOrderCuringParm parm);
    /// <summary>
    /// 手工出库记录
    /// </summary>
    /// <param name="parm"></param>
    /// <returns></returns>
    List<LocaltionOutBean> GetLocationOutBeans(RequestLocaltionOutParm parm);
    /// <summary>
    /// 获取当前订单步骤
    /// </summary>
    /// <param name="summaryId"></param>
    /// <returns></returns>
    int GetOrderStep(long summaryId);
}
public class RequestOrderParm
{
    /// <summary>
    /// 单号
    /// </summary>
    public string OrderNum { get; set; }
}
public class RequestOrderCuringParm
{
    /// <summary>
    /// 硫化机编号
    /// </summary>
    public string EquipId { get; set; }

    /// <summary>
    /// 产品条码
    /// </summary>
    public string BarCode { get; set; }

    /// <summary>
    /// 硫化机名称
    /// </summary>
    public string CuringName { get; set; }

    /// <summary>
    /// 规格(spec)
    /// </summary>
    public string Spec { get; set; }
}

public class RequestLocaltionOutParm
{
    /// <summary>
    /// 开始时间
    /// </summary>
    public List<DateTime> Date { get; set; }
 
    /// <summary>
    /// 条码
    /// </summary>
    public string BarCode { get; set; }
    /// <summary>
    /// 堆垛机编号
    /// </summary>
    public string EquipId { get; set; }

    /// <summary>
    /// 堆垛机名称
    /// </summary>
    public string CrnName { get; set; }
}
public class LocaltionOutBean
{
    /// <summary>
    /// 条码
    /// </summary>
    public string Barcode { get; set; }   

    /// <summary>
    /// 规格
    /// </summary>
    public string Spec { get; set; }
    /// <summary>
    /// 质量
    /// </summary>
    public string Quality { get; set; }
    /// <summary>
    /// 出库库位
    /// </summary>
    public string OutLoc { get; set; }
    /// <summary>
    /// 执行时间
    /// </summary>
    public DateTime? OutTime { get; set; }
    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime? CreateTime { get; set; }

    public string LocName { get;set; }
    public int? TaskNo { get; set; }

    public string TireLock { get; set; }

    public DateTime? TbmExpirationTime { get; set; }



}
public class RequestInCrnParm
{
    /// <summary>
    /// 胎号
    /// </summary>
    public string BarCode { get; set; }
   
}
public class RequestInCrnBean
{
    /// <summary>
    /// 任务号
    /// </summary>
    public int TaskNo { get; set; }
    /// <summary>
    /// 硫化机
    /// </summary>
    public string EquipName { get; set; }
   
    /// <summary>
    /// 规格
    /// </summary>
    public string Spec { get; set; }
    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }
    
    /// <summary>
    /// 条码
    /// </summary>
    public string BarCode { get; set; }
    /// <summary>
    /// 当前所在步骤
    /// </summary>
    public string CurStep { get; set; }
    /// <summary>
    /// 目标货位
    /// </summary>
    public string TargetLoc { get; set; }
   
}
public class RequestOrderCuringBean
{
    public long Id { get; set; }
    /// <summary>
    /// 设备ID
    /// </summary>
    public long EquipId { get; set; }
    public int TaskNo { get; set; }
    /// <summary>
    /// 硫化机
    /// </summary>
    public string EquipName { get; set; }

    public string? EquipCode { get; set; }
    /// <summary>
    /// 左右模
    /// </summary>
    public string EquipMode { get; set; }
    /// <summary>
    /// 出库库位
    /// </summary>
    public string StartLoc { get; set; }
    /// <summary>
    /// 规格
    /// </summary>
    public string Spec { get; set; }
    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime? CreateTime { get; set; }
    /// <summary>
    /// 当前所在步骤
    /// </summary>
    public long Step { get; set; }
    /// <summary>
    /// 条码
    /// </summary>
    public string BarCode { get; set; }
    /// <summary>
    /// 当前所在步骤
    /// </summary>
    public string CurStep { get; set; }
    /// <summary>
    /// 当前库存
    /// </summary>
    public int StockNum { get; set; }
    /// <summary>
    /// 当前所在步骤
    /// </summary>
    public string New { get; set; }

}
public class OutOrderMasterSummarys
{
    public long MasterId { get; set; }
    /// <summary>
    /// 起始货位
    /// </summary>
    public long StartLoc { get; set; }
    /// <summary>
    /// 目标货位
    /// </summary>
    public long TargetLoc { get; set; }
    /// <summary>
    /// 物料ID
    /// </summary>
    public long MaterialId { get; set; }
    /// <summary>
    /// 结束方式
    /// </summary>
    public int FinishMode { get; set; }
    /// <summary>
    /// 单据类型
    /// </summary>
    public int OrderType { get; set; }
    /// <summary>
    /// 单据类型描述
    /// </summary>
    public string OrderTypeDesc { get; set; }
    /// <summary>
    /// 单据号
    /// </summary>
    public string OrderCode { get; set; }
    /// <summary>
    /// 单据状态
    /// </summary>
    public int OrderStatus { get; set; }
    /// <summary>
    /// 单据状态描述
    /// </summary>
    public string OrderStatusDesc { get; set; }
    /// <summary>
    /// 物料号
    /// </summary>
    public string MaterialCode { get; set; }
    /// <summary>
    /// 物料名称
    /// </summary>
    public string MaterialName { get; set; }
    /// <summary>
    /// 目标设备编号
    /// </summary>
    public string TargetEquipCode { get; set; }
    /// <summary>
    /// 物料设备名称
    /// </summary>
    public string TargetEquipName { get; set; }
    /// <summary>
    /// 优先级
    /// </summary>
    public int OrderPriority { get; set; }
    /// <summary>
    /// 时间
    /// </summary>
    public DateTime CreateTime { get; set; }
    /// <summary>
    /// 计划请料数量
    /// </summary>
    public int? PlanCount { get; set; }
    /// <summary>
    /// 实际请料数量
    /// </summary>
    public int? RealCount { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
}

public class RequestPositionParm
{ 
    /// <summary>
    /// 设备编号
    /// </summary>
    public string EquipCode { get; set; }
    /// <summary>
    /// 设备名称 硫化机名称
    /// </summary>
    public string CuringName { get; set; }
}

public class CurRequestPositionBean
{ 
    /// <summary>
    /// 设备名称
    /// </summary>
    public string EquipName { get; set; }
    /// <summary>
    /// 任务号
    /// </summary>
    public int TaskNo { get; set; }
    /// <summary>
    /// 起始库位
    /// </summary>
    public string StartLoc { get; set; }
    /// <summary>
    /// 当前库位
    /// </summary>
    public string CurrentLoc { get; set; }
    /// <summary>
    /// 目标库位
    /// </summary>
    public string TargetLoc { get; set; }


}
